package org.tinygroup.servicewrapper;

import org.springframework.core.NamedThreadLocal;
import org.tinygroup.commons.tools.StringUtil;

public class InvokeNodeSetter {

	private static final ThreadLocal<String> NODE_NAME = new NamedThreadLocal<String>("event node name"); 
	
	public static void setNodeName(String nodeName){
		if (!StringUtil.isBlank(nodeName)) {
			NODE_NAME.set(nodeName);
		}
	}
	
	public static String getNodeName(){
		return NODE_NAME.get();
	}
	
	public static void removeNodeName(){
		NODE_NAME.remove();
	}
	
}
